Package gwtappcontainer.server.apps.insight

Source Code of gwtappcontainer.server.apps.insight.Validator

package gwtappcontainer.server.apps.insight;

import gwtappcontainer.server.apps.APIException;
import gwtappcontainer.shared.apis.APIResponse;

class Validator
         
  static void ensureValidCenter(int centerId) {
    if (centerId == 0)
      throw new APIException(APIResponse.Status.ERROR_RESOURCE_DOES_NOT_EXIST,
          "Cannot find center with id [" + centerId + "]");
   
    if (null == CenterRepository.get(centerId))
      throw new APIException(APIResponse.Status.ERROR_RESOURCE_DOES_NOT_EXIST,
          "Cannot find center with id [" + centerId + "]");
       
  }   
}
TOP

Related Classes of gwtappcontainer.server.apps.insight.Validator

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.